#include<cstdio>
#include<cmath>
#include<cstdlib> 
long long a[21][21];
int aa,bb,n,m;

int ishorse(int a,int b)
{
	if((abs(a-n)==1&&abs(b-m)==2)||(abs(a-n)==2&&abs(b-m)==1)||(a==n&&b==m))
	{
		return 1;
	}
	else return 0;
}
int main()
{
	scanf("%d%d%d%d",&aa,&bb,&n,&m);
	for(int i=0;i<=20;i++)
	{
		for(int j=0;j<=20;j++)
		{
			if(ishorse(i,j))
			{
				a[i][j]=0;
				continue;
			}
			if(i==0&&j==0)
			{
				a[i][j]=1;
			}else if(i==0)
			{
				a[i][j]=a[i][j-1];
			} else if(j==0)
			{
				a[i][j]=a[i-1][j];
			} else a[i][j]=a[i-1][j]+a[i][j-1];
		}
	}
	a[0][0]=0;
	printf("%lld",a[aa][bb]);
	return 0;
}
